import {  Math,Cartesian3,Ion,Viewer,WebMapTileServiceImageryProvider,createWorldTerrain} from 'cesium';
import CesiumNavigation from "./plugins/toolsManage/cesium-navigation-es6/viewerCesiumNavigationMixin";
import "cesium/Build/Cesium/Widgets/widgets.css";
import "./styles/main.css"
import mapinfo from './plugins/toolsManage/mapInfo/mapinfo'
Ion.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1MjI0NjBhZi0xMDZkLTQyOWUtOTQ3OC1lMjdjZTQ0OGMyYmQiLCJpZCI6MTkyOTcsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NzUzMzYzMzR9.ejj73f-8e0bIAzNYNfeCq6_lo7zMDSw4_MVJyIXwV1s"
var viewer = new Viewer('cesiumContainer', {
    terrainProvider: createWorldTerrain(),
    timeline:false,
    animation:false,
    shouldAnimate : true,
    homeButton:false,
    infoBox:false,
    baseLayerPicker:false,
    geocoder:false,
    navigationHelpButton:false,
    scene3DOnly:true,
    fullscreenButton:false
});
viewer.camera.flyTo({
    destination : Cartesian3.fromDegrees(110.158, 28.145,125000),
    orientation : {
        heading : Math.toRadians(0.0),
        pitch : Math.toRadians(-90.0),
        roll : 0.0
    }
});
CesiumNavigation(viewer, {});
var imageryProvider = new WebMapTileServiceImageryProvider({
    url:"http://192.168.52.216:28090/tms/vec/tdt-img/{TileMatrix}/{TileCol}/{TileRow}",
    layer: "tdtBasicLayer",
    style: "default",
    format: "image/jpeg",
    tileMatrixSetID: "GoogleMapsCompatible",
    show: false
})
viewer.scene.imageryLayers.removeAll();
viewer.scene.imageryLayers.addImageryProvider(imageryProvider);
new mapinfo(viewer)